v3.17.0 Peak Load Scaling and ElectricTariff Cost/Rate Outputs#683
Merged
Bill-Becker merged 69 commits intomasterfrom Nov 19, 2025
Merged
v3.17.0 Peak Load Scaling and ElectricTariff Cost/Rate Outputs#683Bill-Becker merged 69 commits intomasterfrom
Bill-Becker merged 69 commits intomasterfrom
Conversation
Deleted the migration file 0093_electricloadoutputs_annual_peak_kw_and_more.py and added the year_one_billed_energy_rate_series ArrayField to the ElectricTariffOutputs model. This change likely reflects a schema update and migration reset to accommodate the new field.
Introduces multiple new fields to ElectricLoadOutputs and ElectricTariffOutputs models for tracking annual peak kW, monthly energy and peak demand, export series, and various billed rate series. Updates Julia HTTP handler to log processing steps and ensures certain result matrices are converted to vectors before response.
Added multiple new fields to the ElectricTariffOutputs model and migration to store URDB-related metadata, including label, rate name, utility, effective date, voltage level, rate description, peak kW capacity min/max, additional info, energy and demand comments, and URL link. These changes support enhanced storage and retrieval of utility rate information.
Adds custom_table_anccr with a comprehensive configuration including general info, rate analysis, annual and monthly costs, load metrics, URDB rate info, and detailed monthly breakdowns.
…on field instead of separate
…fix check for urdb_metadata
… input monthly_peaks_kw
Added ANCCR-specific calculation formulas for year 1 charges and percent changes. Updated and standardized keys and labels for URDB-related fields. Modified scenario_value logic for installation, site, utility, and rate fields. Changed monthly energy and demand cost fields to use BAU series. Implemented monthly total bill cost calculations using fixed, energy, and demand BAU values.
Modified custom_table_anccr to use scenario values instead of BAU for monthly cost fields. Updated Excel export logic to hide all BAU columns for ANCCR tables and use rate names as headers for scenario columns. Also updated the generate_excel_workbook function to accept scenarios and handle new header logic.
Note, will have to delete deployed db associated with this API branch for the new monthly_fixed_cost_... name to work
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Clarifies comments and logic for hiding BAU columns in non-rates tables within the Excel workbook generation. No functional changes, only improved code readability.
This reverts commit bcfd5c2.
This reverts commit 2e8a043.
…rse"" This reverts commit ee1d57b.
ElectricTariff Outputs, Peak Load Scaling, Endpoint Updates
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds peak load scaling capabilities and ElectricTariff cost/rate outputs to REopt API v3.17.0. The changes enable users to scale loads to monthly peak demands while maintaining energy consumption, and provide detailed monthly and annual utility rate analysis outputs.
Key Changes
- Added
monthly_peaks_kwinput to ElectricLoad for peak-based load scaling - Added extensive ElectricTariff outputs for monthly cost and rate breakdowns
- Introduced new
/get_load_metricsendpoint for load profile analysis - Added
custom_table_ratesconfiguration for utility rate comparison in Excel reports
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| reoptjl/views.py | Added get_load_metrics endpoint, round_values helper, updated simulated_load validation logic, and enhanced Excel workbook generation to support rate comparison table without BAU columns |
| reoptjl/urls.py | Registered new /get_load_metrics endpoint |
| reoptjl/models.py | Added monthly_peaks_kw input field to ElectricLoadInputs, new load metric outputs to ElectricLoadOutputs, urdb_metadata to ElectricTariffInputs, and extensive monthly/rate outputs to ElectricTariffOutputs |
| reoptjl/src/process_results.py | Added ElectricTariffInputs to update handling for urdb_metadata persistence |
| reoptjl/custom_table_config.py | Added comprehensive custom_table_rates configuration with 740+ lines of rate comparison metrics and calculations |
| reoptjl/custom_table_helpers.py | Enhanced flatten_dict to handle arrays with indexed keys, updated sum_vectors to preserve monthly series |
| reoptjl/test/test_job_endpoint.py | Removed obsolete SteamTurbine federal_itc_fraction test skip |
| reoptjl/test/posts/*.json | Added monthly_peaks_kw test data and updated sector defaults |
| reoptjl/migrations/0110_*.py | Django migration for new ElectricLoad and ElectricTariff fields |
| julia_src/http.jl | Added get_load_metrics function, updated type conversions to Float64, added ElectricTariff metadata handling, and new info logging |
| julia_src/Manifest.toml | Updated REopt.jl dependency from v0.55.1 to v0.56.2 |
| CHANGELOG.md | Documented new features and fixes for v3.17.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
rathod-b
approved these changes
Nov 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR:
Which is a combo of these two PR's plus a new results spreadsheet table for rate comparison: